<template>
	<view class="body">
		<view class="dsc">
			<!-- <u-image :showLoading="true" src="https://cdn.uviewui.com/uview/album/1.jpg" width="160px" height="160px" @click="click"></u-image> -->
			<!-- <u-image width="160px" height="160px" @click="click" src="https://cdn.uviewui.com/uview/album/1.jpg"></u-image> -->
			<image :src="goodsInfo.image" style="width: 160px;height: 160px;text-align: center;" mode=""></image>
		</view>
		<view>
			<!-- 类型选择 -->

			<u-form-item label-width="100px" label="商品名称" prop="form.sex" borderBottom ref="item1">
				<view class="right-text">{{ goodsInfo.name }}</view>
			</u-form-item>

			
			<u-form-item label-width="100px" label="货号" prop="form.name" borderBottom ref="item1">
				<view class="right-text">{{ goodsInfo.name }}</view>
			</u-form-item>

			<!-- <u-form-item label-width="100px" label="客户名称" prop="form.name" borderBottom ref="item1">
				<view class="right-text">{{ goodsInfo.name }}</view>
			</u-form-item> -->
			<u-form-item label-width="100px" label="类型" prop="form.sex" borderBottom ref="item1">
				<view class="right-text">{{ goodsInfo.product_type_id }}</view>
			</u-form-item>

			
			<u-form-item label-width="100px" label="规格" prop="form.name" borderBottom ref="item1">
				<view class="right-text">{{ goodsInfo.specification }}</view>
			</u-form-item>

			<u-form-item label-width="100px" label="品牌" prop="form.name" borderBottom ref="item1">
				<view class="right-text">!!!!</view>
			</u-form-item>
			<u-form-item label-width="100px" label="单位" prop="form.sex" borderBottom ref="item1">
				<view class="right-text">{{ goodsInfo.product_unit_id }}</view>
			</u-form-item>

			
			<u-form-item label-width="100px" label="库存" prop="form.name" borderBottom ref="item1">
				<view class="right-text">{{ goodsInfo.inventory }}</view>
			</u-form-item>

			<!-- <u-form-item label-width="100px" label="仓库" prop="form.name" borderBottom ref="item1">
				<view class="right-text">{{ goodsInfo.name }}</view>
			</u-form-item>

			<u-form-item label-width="100px" label="仓库电话" prop="form.name" borderBottom ref="item1">
				<view class="right-text">321元</view>
			</u-form-item> -->
		</view>
	</view>
</template>

<script>
	var _this;
	export default {
		data() {
			return {
				gid:null,
				goodsInfo:[]
			};
		},
		onLoad(query) {
			_this = this;
			_this.gid = query.pid
			console.log('_this.gid: ', _this.gid)
			_this.getDetail()
		},
		methods:{
			getDetail() {
				_this._post_form('/api/ykjp/product/product/detail', {id:_this.gid}, (result) => {
			
					// _this.setData({'sortlist' : result.data.data})
					_this.goodsInfo = result.data.data
					console.log('goodsInfo: ', _this.goodsInfo)
			
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.dsc{
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.body{
		padding: 20rpx;
		.right-text {
			font-weight: 500;
			font-size: 16px;
			text-align: right;
		}
	}
</style>
